package com.feng.chat.pojo;

import io.gitee.zerowsh.actable.annotation.AcColumn;
import io.gitee.zerowsh.actable.annotation.AcTable;
import io.gitee.zerowsh.actable.emnus.ColumnTypeEnums;

import java.time.LocalTime;

@AcTable(name = "talk_records",comment = "用户聊天记录表")
public class TalkRecords {
    @AcColumn(name = "id",comment = "聊天记录ID",type = ColumnTypeEnums.INT,length = 20,isAutoIncrement = true,isKey = true)
    private Integer id;

    @AcColumn(name = "talk_type",defaultValue = "1",comment = "对话类型[1:私信;2:群聊;]",type = ColumnTypeEnums.TINYINT)
    private Integer talk_type;

    @AcColumn(name = "msg_type",defaultValue = "1",comment = "消息类型[1:文本消息;2:文件消息;3:会话消息;4:代码消息;5:投票消息;6:群公告;7:好友申请;8:登录通知;9:入群消息/退群消息;]",type = ColumnTypeEnums.TINYINT)
    private Integer msg_type;

    @AcColumn(name = "user_id",defaultValue = "0",comment = "发送者ID（0:代表系统消息 >0: 用户ID",type = ColumnTypeEnums.INT)
    private Integer user_id;

    @AcColumn(name = "receiver_id",defaultValue = "0",comment = "接收者ID（用户ID 或 群ID）",type = ColumnTypeEnums.INT)
    private Integer receiver_id;

    @AcColumn(name = "is_revoke",defaultValue = "0",comment = "是否撤回消息[0:否;1:是]",type = ColumnTypeEnums.TINYINT)
    private Integer is_revoke;

    @AcColumn(name = "is_mark",defaultValue = "0",comment = "是否重要消息[0:否;1:是;]",type = ColumnTypeEnums.TINYINT)
    private Integer is_mark;

    @AcColumn(name = "is_read",defaultValue = "0",comment = "是否已读[0:否;1:是;]",type = ColumnTypeEnums.TINYINT)
    private Integer is_read;

    @AcColumn(name = "quote_id",defaultValue = "0",comment = "引用消息ID",type = ColumnTypeEnums.INT)
    private Integer quote_id;

    @AcColumn(name = "content", defaultValue = "", comment = "图片链接", type = ColumnTypeEnums.TEXT, isNull = false)
    private String content;

    @AcColumn(name = "warn_users", defaultValue = "", comment = "@好友 、 多个用英文逗号 “,” 拼接 (0:代表所有人)", type = ColumnTypeEnums.VARCHAR,length = 200,isNull = false)
    private String warn_users;

    @AcColumn(name = "created_at", comment = "创建时间", type = ColumnTypeEnums.DATETIME, isNull = true)
    private LocalTime createdAt;

    @AcColumn(name = "updated_at", comment = "更新时间", type = ColumnTypeEnums.DATETIME, isNull = true)
    private LocalTime updatedAt;
}
